/**
 * findloser.com Inc.
 * Copyright (c) 2013-2013 All Rights Reserved.
 */
package com.losenote.service.result;

import java.util.List;

import org.springframework.util.CollectionUtils;

import com.losenote.enums.LnResultCodeEnum;
import com.losenote.model.FindNote;
import com.losenote.model.Message;
import com.losenote.model.Question;

/**
 * 组织result对象
 * @author danjingyu
 * @version $Id: GroupResult.java, v 0.1 2013-4-22 下午10:26:29 danjingyu Exp $
 */
public class FindNoteResult extends LnResult {

    /**默认id*/
    private static final long serialVersionUID = 1L;

    /**拾到的物品*/
    private FindNote          findNote;

    /**消息*/
    private List<Message>     replyMessages;

    /**设置的问题*/
    private List<Question>    questions;

    /**
     * 默认构造函数
     */
    public FindNoteResult() {

    }

    /**
     * 默认构造函数
     * 
     * @param findNote
     * @param replyMessages 
     */
    public FindNoteResult(FindNote findNote, List<Question> questions, List<Message> replyMessages) {
        this.success = true;
        this.replyMessages = replyMessages;
        this.questions = questions;
        this.code = LnResultCodeEnum.SUCCESS.getCode();
        this.message = LnResultCodeEnum.SUCCESS.getDescription();
        this.findNote = findNote;
    }

    public List<Question> getQuestions() {
        return questions;
    }

    public void setQuestions(List<Question> questions) {
        this.questions = questions;
    }

    public FindNote getFindNote() {
        return findNote;
    }

    public void setFindNote(FindNote findNote) {
        this.findNote = findNote;
    }

    public List<Message> getReplyMessages() {
        return replyMessages;
    }

    public void setReplyMessages(List<Message> replyMessages) {
        this.replyMessages = replyMessages;
    }

    public boolean isSecret() {
        return !CollectionUtils.isEmpty(questions);
    }

    /**
     * 判断当前信息是否public模式
     * 
     * @return
     */
    public boolean isPublicModel() {
        return CollectionUtils.isEmpty(questions);
    }

}
